import axios from '../network/index'
import qs from "qs"
// 请求总区域树
export function getAreaList(params) {
  return axios.get('/dev/area/getAreaList', params)
}
// 删除树节点
export function getDelArea(params) {
  return axios.post('/dev/area/delArea', qs.stringify(params))
}
//保存区域
export function getSaveArea(params) {
  return axios.post('/dev/area/saveArea', qs.stringify(params))
}

//获取房间区域树
export function getAreaTree(params) {
  return axios.get('/dev/room/getAreaTree', params)
}
//获取房间列表
export function getRoomList(params) {
  return axios.get('/dev/room/getRoomList', params)
}

//批量新增房间
export function getBatchAddRoom(params) {
  return axios.post('/dev/room/batchAddRoom', qs.stringify(params))
}

//获取设备区域树
export function getDevAreaTree(params) {
  return axios.get('/dev/device/getAreaTree', params)
}
//获取设备列表
export function getDeviceList(params) {
  return axios.get('/dev/device/getDeviceList', params)
}

//保存设备
export function getSaveDevice(params) {
  return axios.post('/dev/device/saveDevice', qs.stringify(params))
}
//删除设备

export function getDeleteDevice(params) {
  return axios.post('/dev/device/deleteDevice', qs.stringify(params))
}

//获取设备读头信息
export function getDeviceReadList(params) {
  return axios.get('/dev/device/getDeviceReadList', params)
}



//获取门禁列表
export function getDoorList(params) {
  return axios.get('/dev/door/getDoorList', params)
}

//根据时段名称模糊查询时段列表

export function getTimeZoneList(params) {
  return axios.get('/dev/TimeZone/getTimeZoneList', params)
}

//添加时段

export function saveTimeZone(params) {
  return axios.post('/dev/TimeZone/saveTimeZone', qs.stringify(params))
}
//修改时段

export function updateTimeZone(params) {
  return axios.post('/dev/TimeZone/updateTimeZone', qs.stringify(params))
}
//删除时段
export function deleteTimeZone(params) {
  return axios.post('/dev/TimeZone/deleteTimeZone', qs.stringify(params))
}
//保存读头
export function saveDeviceRead(params) {
  return axios.post('/dev/device/saveDeviceRead', qs.stringify(params))
}
//根据id删除读头
export function deleteReadById(params) {
  return axios.post('/dev/device/deleteReadById', qs.stringify(params))
}
//批量删除房间
export function delRoom(params) {
  return axios.post('/dev/room/delRoom', qs.stringify(params))
}
//获取读头设备
export function getReadDeviceList(params) {
  return axios.get('/dev/device/getReadDeviceList', params)
}
